<template>
  <div class="bd-button">
    <el-button
      v-for="btn in handlerBtn"
      :key="btn.id"
      :type="btn.type || 'primary'"
      size="mini"
      :icon="btn.icon"
      :disabled="btn.disabled && btn.disabled(scope)"
      @click="btn.handler && btn.handler($event, scope, btn)"
      v-permission="btn.permission ? btn.permission : ['un:auth']"
    >
      {{ btn.name }}
    </el-button>
  </div>
</template>
<script>
export default {
  name: 'bdButton',
  components: {},
  props: {
    handlerBtn: {
      type: Array,
      required: true
    },
    scope: {
      type: [Array, Object, String]
    }
  },
  methods: {
  }
}
</script>
<style lang="scss" scoped>

</style>
